import { getToken } from "@/utils/token"
import { Navigate } from "react-router-dom"
// 路由导航守卫
function AuthRouter({ children }) {
    const token = getToken()
    return token ? children : <Navigate to="/login" replace />
}
export { AuthRouter }